<!DOCTYPE html>
<html>
<head>
    <title>Hello, World</title>
    <script
        src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js">

    </script>
    <script>
        function submitForm() {
            $.get('http://localhost:8080/greeting/'+
                $('#helloform input[name=name]').val(),
                function(data) {
                    $("#greeting").text(data.message);
                },
                'json');
        };
    </script>
    <style>
        p#greeting {
            font-family: "Andale Mono",monospace;
        }
    </style>
</head>
<body>
<div>
    <form id="helloform">
        <p>
            Hello, what is your name?
            <input type="text" name="name"/>
            <input type="button" value="Submit" onclick="submitForm()"/>
        </p>
        <p id="greeting"></p>
    </form>
</div>
</body>
</html>